/*
 *  Copyright 2011 yura.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package org.opu.vcforms.template.bean.docx;

import java.util.Properties;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementMap;
import org.simpleframework.xml.Root;

/**
 *  Store in sources tag
 * @see org.opu.vcforms.template.bean.Content
 * @author yura
 */
@Root(name="content")
public class ContentDescription {

    @ElementMap(entry = "property", key = "name", name = "properties",
            attribute = true, required = false, data = true,
            keyType = String.class, valueType = String.class)
    private Properties properties;

    @Attribute
    private String type;

    /**
     * The name of tag where to current tag must be inserted.
     * <pre><b>For example:</b>
     * {@code
     *  <w:document>
     *      ...
     *      <w:tbl>
     *          <!--   we want that contant statrt here -->
     *          <w:tr>
     *              ...
     *          </w:tr>
     *          ...
     *      </w:tbl>
     *      ...
     *  </w:document>
     * }
     * So 'in' value must be <b>tbl</b></pre>
     */
    @Attribute(required = false)
    private String in;

    /**
     * The name of tag that current tag must describe.
     * <pre><b>For example:</b>
     * {@code
     *  <w:document>
     *      ...
     *      <w:tbl>
     *          <!--   we want that contant describe rows -->
     *          <w:tr>
     *              ...
     *          </w:tr>
     *          ...
     *      </w:tbl>
     *      ...
     *  </w:document>
     * }
     * So 'describe' value must be <b>tr</b></pre>
     */
    @Attribute(required = false)
    private String describe;

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    /**
     * @see #describe
     */
    public String getDescribe() {
        return describe;
    }

    /**
     * @see #describe
     */
    public void setDescribe(String describe) {
        this.describe = describe;
    }

    /**
     * @see #in
     */
    public String getIn() {
        return in;
    }

    /**
     * @see #in
     */
    public void setIn(String in) {
        this.in = in;
    }
}
